<%--
  Created by IntelliJ IDEA.
  User: 27236
  Date: 2021/8/21
  Time: 17:06
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
  <meta charset="utf-8"/>
  <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
  <meta name="viewport" content="width=device-width, initial-scale=1"/>
  <title>考试信息</title>
  <link href="${pageContext.request.contextPath}/static/css/bootstrap.min.css" rel="stylesheet">
  <script src="${pageContext.request.contextPath}/static/js/jquery-3.6.0.js"></script>
  <!-- 3. 导入bootstrap的js文件 -->
  <script src="${pageContext.request.contextPath}/static/js/bootstrap.min.js"></script>

</head>
<body>

<div class="container" style="width: 600px;">
  <form action="${pageContext.request.contextPath}/Test/calculate/${examId}/${gradeId}" method="post">
    <security:csrfInput/>
  <br>
  <a href="${pageContext.request.contextPath}/Student/getGrade/${sessionScope.user.id}" role="button">返回主页</a>
  <br>
  <h2>试卷难度 : ${detailExam.difficulty}</h2>
  <h2>分析</h2>
  <p class="lead">${detailExam.analyzes}</p>
  <hr>
  <h2>选择题</h2>
  <c:forEach items="${detailExam.question.choiceList}" var="choice" varStatus="s">
    <h4>${s.count} . ${choice.title} <small>分值 : ${choice.score}</small></h4>
    <h6>A . ${choice.questionA}</h6>
    <h6>B . ${choice.questionB}</h6>
    <h6>C . ${choice.questionC}</h6>
    <h6>D . ${choice.questionD}</h6>
    <h6>学生答案:${choice.studentAnswer} 正确答案:${choice.answer}</h6>
    <h6>分析:${choice.analyze}</h6>
  </c:forEach>
  <hr>
  <h2>填空题</h2>
  <c:forEach items="${detailExam.question.fillList}" var="fill" varStatus="s">
    <h4>${s.count} . ${fill.title} <small>分值 : ${fill.score}</small></h4>
    <h6>学生答案 : ${fill.studentAnswer}</h6>
    <h6>正确答案 : ${fill.answer}</h6>
    <h6>分析:${fill.analyze}</h6>
    <div class="col-lg-12">
      <input type="number" min="0" class="form-control" id="fill" name="fills" placeholder="请打分">
    </div>
  </c:forEach>
  <hr>
  <h2>简答题</h2>
  <c:forEach items="${detailExam.question.shortAnswerList}" var="sa" varStatus="s">
    <h4>${s.count} . ${sa.title} <small>分值 : ${sa.score}</small></h4>
    <h6>学生答案 : ${sa.studentAnswer} </h6>
    <h6>正确答案 : ${sa.answer}</h6>
    <h6>分析:${sa.analyze}</h6>
    <div class="col-lg-12" >
      <input type="number" min="0" class="form-control" id="short" name="shorts" placeholder="请打分">
    </div>
  </c:forEach>

  <div align="center">
    <input class="btn btn-default" type="submit" value="添加" />
  </div>
  </form>
</div>

</body>
</html>